# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-dsnap
_pkgname=dsnap
pkgver=1.0.1
pkgrel=1
pkgdesc="Utility for downloading EBS snapshots using the EBS Direct API's."
arch=('any')
url='https://pypi.org/project/dsnap/#files'
license=('custom:unknown')
depends=('python' 'python-boto3' 'python-urllib3')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('9594b345290b521f30d127c174e57ffe2404c6d7d8764d9dd3ad6faa9fee3f867549e9d1d9d21bd317bbdf65aec1df29c9d30e412b096ddecd967eb839805d19')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

